/*
 *  Copyright 2001-2004 The Apache Software Foundation
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package ar.uba.fi.posgrado.economy.web.dto;

import org.json.JSONException;
import org.json.JSONObject;

import ar.uba.fi.posgrado.common.dto.JSONable;

/**
 * DTO de Beneficios JSONables.<br>
 * 
 * @author nicolas.gonzalez
 * @see JSONable
 */
public class BenefitDTO implements JSONable {

    private String description;
    private String valueOrPercentageLabel;
    private String value;
    private String id;
    
    /**
     * @see ar.uba.fi.posgrado.common.dto.JSONable#toJSON()
     */
    public JSONObject toJSON() {
        try {
            JSONObject response = new JSONObject();
            response.put("description", this.description);
            response.put("valueOrPercentageLabel", this.valueOrPercentageLabel);
            response.put("value", this.value);
            response.put("id", this.id);
            
            return response;
        }
        catch (JSONException e) {
            return new JSONObject();
        }
    }


    /**
     * @return the description
     */
    public String getDescription() {
        return this.description;
    }

    /**
     * @param description the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return the value
     */
    public String getValue() {
        return this.value;
    }

    /**
     * @param value the value to set
     */
    public void setValue(String value) {
        this.value = value;
    }


    /**
     * @return the valueOrPercentageLabel
     */
    public String getValueOrPercentageLabel() {
        return this.valueOrPercentageLabel;
    }


    /**
     * @param valueOrPercentageLabel the valueOrPercentageLabel to set
     */
    public void setValueOrPercentageLabel(String valueOrPercentageLabel) {
        this.valueOrPercentageLabel = valueOrPercentageLabel;
    }


    /**
     * @return the id
     */
    public String getId() {
        return this.id;
    }


    /**
     * @param id the id to set
     */
    public void setId(String id) {
        this.id = id;
    }
    
    

}
